<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Conf\ConfModel;

use Srv\Libs\ConfModel\ConfAbstract;

final class EmailConf extends ConfAbstract
{
    public const PREFIX                         = 'EMAIL.';     // 配置前缀[必定点结尾]
    private string $groupName                   = '';           // 分组名
    protected string $fromAddress               = '';           // 发送邮件地址
    protected string $fromName                  = '';           // 发送邮件名称
    protected string $apiKey                    = '';           // apiKey
    protected string $secretKey                 = '';           // secretKey
    protected string $logPath                   = '';           // 日志文件路径

    /**
     * @param array $confData
     * @param string $groupName
     */
    public function __construct(array $confData, string $groupName)
    {
        $this->init($confData);
        $this->groupName = $groupName;
    }

    /**
     * @return string
     */
    public function getGroupName(): string
    {
        return $this->groupName;
    }

    /**
     * @return string
     */
    public function getFromAddress(): string
    {
        return $this->fromAddress;
    }

    /**
     * @return string
     */
    public function getFromName(): string
    {
        return $this->fromName;
    }

    /**
     * @return string
     */
    public function getApiKey(): string
    {
        return $this->apiKey;
    }

    /**
     * @return string
     */
    public function getSecretKey(): string
    {
        return $this->secretKey;
    }

    /**
     * @return string
     */
    public function getLogPath(): string
    {
        return $this->logPath;
    }
}